using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._Statistics
{
    /// <summary>
    /// <para>Tabulate Intersection</para>
    /// <para>Computes the intersection between two feature classes and cross tabulates the area, length, or count of the  intersecting features.</para>
    /// <para>计算两个要素类之间的交点，并将相交要素的面积、长度或计数交叉制表。</para>
    /// </summary>    
    [DisplayName("Tabulate Intersection")]
    public class TabulateIntersection : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TabulateIntersection()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_zone_features">
        /// <para>Input Zone Features</para>
        /// <para>The features used to identify zones.</para>
        /// <para>用于识别区域的功能。</para>
        /// </param>
        /// <param name="_zone_fields">
        /// <para>Zone Fields</para>
        /// <para>The attribute field or fields that will be used to define zones.</para>
        /// <para>将用于定义区域的一个或多个属性字段。</para>
        /// </param>
        /// <param name="_in_class_features">
        /// <para>Input Class Features</para>
        /// <para>The features used to identify classes.</para>
        /// <para>用于标识类的特征。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Table</para>
        /// <para>The table that will contain the cross tabulation of intersections between zones and classes.</para>
        /// <para>将包含区域和类之间交叉点的交叉列表的表。</para>
        /// </param>
        public TabulateIntersection(object _in_zone_features, List<object> _zone_fields, object _in_class_features, object _out_table)
        {
            this._in_zone_features = _in_zone_features;
            this._zone_fields = _zone_fields;
            this._in_class_features = _in_class_features;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Tabulate Intersection";

        public override string CallName => "analysis.TabulateIntersection";

        public override List<string> AcceptEnvironments => ["XYDomain", "XYResolution", "XYTolerance", "autoCommit", "configKeyword", "extent", "outputCoordinateSystem", "qualifiedFieldNames", "scratchWorkspace"];

        public override object[] ParameterInfo => [_in_zone_features, _zone_fields, _in_class_features, _out_table, _class_fields, _sum_fields, _xy_tolerance, _out_units.GetGPValue()];

        /// <summary>
        /// <para>Input Zone Features</para>
        /// <para>The features used to identify zones.</para>
        /// <para>用于识别区域的功能。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Zone Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_zone_features { get; set; }


        /// <summary>
        /// <para>Zone Fields</para>
        /// <para>The attribute field or fields that will be used to define zones.</para>
        /// <para>将用于定义区域的一个或多个属性字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Zone Fields")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _zone_fields { get; set; }


        /// <summary>
        /// <para>Input Class Features</para>
        /// <para>The features used to identify classes.</para>
        /// <para>用于标识类的特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Class Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_class_features { get; set; }


        /// <summary>
        /// <para>Output Table</para>
        /// <para>The table that will contain the cross tabulation of intersections between zones and classes.</para>
        /// <para>将包含区域和类之间交叉点的交叉列表的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Class Fields</para>
        /// <para>The attribute field or fields used to define classes.</para>
        /// <para>用于定义类的一个或多个属性字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Class Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _class_fields { get; set; } = null;


        /// <summary>
        /// <para>Sum Fields</para>
        /// <para>The fields to sum from the Input Class Features parameter.</para>
        /// <para>要从输入类要素参数求和的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sum Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _sum_fields { get; set; } = null;


        /// <summary>
        /// <para>XY Tolerance</para>
        /// <para><xdoc>
        ///   <para>The distance that determines the range in which features or their vertices are considered equal. By default, this is the XY Tolerance of the Input Zone Features parameter.</para>
        ///   <para>Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定要素或其折点相等的范围的距离。默认情况下，这是输入区域特征参数的 XY 容差。</para>
        ///   <para>更改此参数的值可能会导致失败或意外结果。建议不要修改该参数。它已从工具对话框的视图中删除。默认情况下，将使用输入要素类的空间参考 x，y 容差属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("XY Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _xy_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Output Units</para>
        /// <para><xdoc>
        ///   <para>Specifies the units that will be used to calculate area or length measurements. Setting output units when the input class features are points is not supported.</para>
        ///   <bulletList>
        ///     <bullet_item>Unknown—The units will be unknown.</bullet_item><para/>
        ///     <bullet_item>Inches—The units will be inches.</bullet_item><para/>
        ///     <bullet_item>Feet—The units will be feet.</bullet_item><para/>
        ///     <bullet_item>Yards—The units will be yards.</bullet_item><para/>
        ///     <bullet_item>Miles—The units will be miles.</bullet_item><para/>
        ///     <bullet_item>Nautical miles—The units will be nautical miles.</bullet_item><para/>
        ///     <bullet_item>Millimeters—The units will be millimeters.</bullet_item><para/>
        ///     <bullet_item>Centimeters—The units will be centimeters.</bullet_item><para/>
        ///     <bullet_item>Decimeters—The units will be decimeters.</bullet_item><para/>
        ///     <bullet_item>Meters—The units will be meters.</bullet_item><para/>
        ///     <bullet_item>Kilometers—The units will be kilometers.</bullet_item><para/>
        ///     <bullet_item>Decimal degrees—The units will be decimal degrees.</bullet_item><para/>
        ///     <bullet_item>Points—The units will be points.</bullet_item><para/>
        ///     <bullet_item>Ares—The units will be ares.</bullet_item><para/>
        ///     <bullet_item>Acres—The units will be acres.</bullet_item><para/>
        ///     <bullet_item>Hectares—The units will be hectares.</bullet_item><para/>
        ///     <bullet_item>Square inches—The units will be square inches.</bullet_item><para/>
        ///     <bullet_item>Square feet—The units will be square feet.</bullet_item><para/>
        ///     <bullet_item>Square yards—The units will be square yards.</bullet_item><para/>
        ///     <bullet_item>Square miles—The units will be square miles.</bullet_item><para/>
        ///     <bullet_item>Square millimeters—The units will be square millimeters.</bullet_item><para/>
        ///     <bullet_item>Square centimeters—The units will be square centimeters.</bullet_item><para/>
        ///     <bullet_item>Square decimeters—The units will be square decimeters.</bullet_item><para/>
        ///     <bullet_item>Square meters—The units will be square meters.</bullet_item><para/>
        ///     <bullet_item>Square kilometers—The units will be square kilometers.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于计算面积或长度测量值的单位。当输入类要素为点时，不支持设置输出单位。</para>
        ///   <bulletList>
        ///     <bullet_item>未知—单位将未知。</bullet_item><para/>
        ///     <bullet_item>英寸—单位将为英寸。</bullet_item><para/>
        ///     <bullet_item>英尺—单位将为英尺。</bullet_item><para/>
        ///     <bullet_item>码—单位将为码。</bullet_item><para/>
        ///     <bullet_item>英里—单位为英里。</bullet_item><para/>
        ///     <bullet_item>海里—单位为海里。</bullet_item><para/>
        ///     <bullet_item>毫米—单位将为毫米。</bullet_item><para/>
        ///     <bullet_item>厘米—单位将为厘米。</bullet_item><para/>
        ///     <bullet_item>分米—单位将为分米。</bullet_item><para/>
        ///     <bullet_item>米—单位为米。</bullet_item><para/>
        ///     <bullet_item>千米—单位将为千米。</bullet_item><para/>
        ///     <bullet_item>十进制度—单位为十进制度。</bullet_item><para/>
        ///     <bullet_item>点—单位将为点。</bullet_item><para/>
        ///     <bullet_item>Ares—单位将为 ares。</bullet_item><para/>
        ///     <bullet_item>英亩—单位为英亩。</bullet_item><para/>
        ///     <bullet_item>公顷—单位将为公顷。</bullet_item><para/>
        ///     <bullet_item>平方英寸—单位将为平方英寸。</bullet_item><para/>
        ///     <bullet_item>平方英尺—单位将为平方英尺。</bullet_item><para/>
        ///     <bullet_item>平方码—单位将为平方码。</bullet_item><para/>
        ///     <bullet_item>平方英里—单位将为平方英里。</bullet_item><para/>
        ///     <bullet_item>平方毫米—单位将为平方毫米。</bullet_item><para/>
        ///     <bullet_item>平方厘米—单位将为平方厘米。</bullet_item><para/>
        ///     <bullet_item>平方分米—单位将为平方分米。</bullet_item><para/>
        ///     <bullet_item>平方米—单位将为平方米。</bullet_item><para/>
        ///     <bullet_item>平方公里—单位将为平方千米。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _out_units_value _out_units { get; set; } = _out_units_value._UNKNOWN;

        public enum _out_units_value
        {
            /// <summary>
            /// <para>Unknown</para>
            /// <para>Unknown—The units will be unknown.</para>
            /// <para>未知—单位将未知。</para>
            /// </summary>
            [Description("Unknown")]
            [GPEnumValue("UNKNOWN")]
            _UNKNOWN,

            /// <summary>
            /// <para>Inches</para>
            /// <para>Inches—The units will be inches.</para>
            /// <para>英寸—单位将为英寸。</para>
            /// </summary>
            [Description("Inches")]
            [GPEnumValue("INCHES")]
            _INCHES,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet—The units will be feet.</para>
            /// <para>英尺—单位将为英尺。</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("FEET")]
            _FEET,

            /// <summary>
            /// <para>Yards</para>
            /// <para>Yards—The units will be yards.</para>
            /// <para>码—单位将为码。</para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("YARDS")]
            _YARDS,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—The units will be miles.</para>
            /// <para>英里—单位为英里。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("MILES")]
            _MILES,

            /// <summary>
            /// <para>Nautical miles</para>
            /// <para>Nautical miles—The units will be nautical miles.</para>
            /// <para>海里—单位为海里。</para>
            /// </summary>
            [Description("Nautical miles")]
            [GPEnumValue("NAUTICAL_MILES")]
            _NAUTICAL_MILES,

            /// <summary>
            /// <para>Millimeters</para>
            /// <para>Millimeters—The units will be millimeters.</para>
            /// <para>毫米—单位将为毫米。</para>
            /// </summary>
            [Description("Millimeters")]
            [GPEnumValue("MILLIMETERS")]
            _MILLIMETERS,

            /// <summary>
            /// <para>Centimeters</para>
            /// <para>Centimeters—The units will be centimeters.</para>
            /// <para>厘米—单位将为厘米。</para>
            /// </summary>
            [Description("Centimeters")]
            [GPEnumValue("CENTIMETERS")]
            _CENTIMETERS,

            /// <summary>
            /// <para>Decimeters</para>
            /// <para>Decimeters—The units will be decimeters.</para>
            /// <para>分米—单位将为分米。</para>
            /// </summary>
            [Description("Decimeters")]
            [GPEnumValue("DECIMETERS")]
            _DECIMETERS,

            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—The units will be meters.</para>
            /// <para>米—单位为米。</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("METERS")]
            _METERS,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—The units will be kilometers.</para>
            /// <para>千米—单位将为千米。</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("KILOMETERS")]
            _KILOMETERS,

            /// <summary>
            /// <para>Decimal degrees</para>
            /// <para>Decimal degrees—The units will be decimal degrees.</para>
            /// <para>十进制度—单位为十进制度。</para>
            /// </summary>
            [Description("Decimal degrees")]
            [GPEnumValue("DECIMAL_DEGREES")]
            _DECIMAL_DEGREES,

            /// <summary>
            /// <para>Points</para>
            /// <para>Points—The units will be points.</para>
            /// <para>点—单位将为点。</para>
            /// </summary>
            [Description("Points")]
            [GPEnumValue("POINTS")]
            _POINTS,

            /// <summary>
            /// <para>Ares</para>
            /// <para>Ares—The units will be ares.</para>
            /// <para>Ares—单位将为 ares。</para>
            /// </summary>
            [Description("Ares")]
            [GPEnumValue("ARES")]
            _ARES,

            /// <summary>
            /// <para>Acres</para>
            /// <para>Acres—The units will be acres.</para>
            /// <para>英亩—单位为英亩。</para>
            /// </summary>
            [Description("Acres")]
            [GPEnumValue("ACRES")]
            _ACRES,

            /// <summary>
            /// <para>Hectares</para>
            /// <para>Hectares—The units will be hectares.</para>
            /// <para>公顷—单位将为公顷。</para>
            /// </summary>
            [Description("Hectares")]
            [GPEnumValue("HECTARES")]
            _HECTARES,

            /// <summary>
            /// <para>Square inches</para>
            /// <para>Square inches—The units will be square inches.</para>
            /// <para>平方英寸—单位将为平方英寸。</para>
            /// </summary>
            [Description("Square inches")]
            [GPEnumValue("SQUARE_INCHES")]
            _SQUARE_INCHES,

            /// <summary>
            /// <para>Square feet</para>
            /// <para>Square feet—The units will be square feet.</para>
            /// <para>平方英尺—单位将为平方英尺。</para>
            /// </summary>
            [Description("Square feet")]
            [GPEnumValue("SQUARE_FEET")]
            _SQUARE_FEET,

            /// <summary>
            /// <para>Square yards</para>
            /// <para>Square yards—The units will be square yards.</para>
            /// <para>平方码—单位将为平方码。</para>
            /// </summary>
            [Description("Square yards")]
            [GPEnumValue("SQUARE_YARDS")]
            _SQUARE_YARDS,

            /// <summary>
            /// <para>Square miles</para>
            /// <para>Square miles—The units will be square miles.</para>
            /// <para>平方英里—单位将为平方英里。</para>
            /// </summary>
            [Description("Square miles")]
            [GPEnumValue("SQUARE_MILES")]
            _SQUARE_MILES,

            /// <summary>
            /// <para>Square millimeters</para>
            /// <para>Square millimeters—The units will be square millimeters.</para>
            /// <para>平方毫米—单位将为平方毫米。</para>
            /// </summary>
            [Description("Square millimeters")]
            [GPEnumValue("SQUARE_MILLIMETERS")]
            _SQUARE_MILLIMETERS,

            /// <summary>
            /// <para>Square centimeters</para>
            /// <para>Square centimeters—The units will be square centimeters.</para>
            /// <para>平方厘米—单位将为平方厘米。</para>
            /// </summary>
            [Description("Square centimeters")]
            [GPEnumValue("SQUARE_CENTIMETERS")]
            _SQUARE_CENTIMETERS,

            /// <summary>
            /// <para>Square decimeters</para>
            /// <para>Square decimeters—The units will be square decimeters.</para>
            /// <para>平方分米—单位将为平方分米。</para>
            /// </summary>
            [Description("Square decimeters")]
            [GPEnumValue("SQUARE_DECIMETERS")]
            _SQUARE_DECIMETERS,

            /// <summary>
            /// <para>Square meters</para>
            /// <para>Square meters—The units will be square meters.</para>
            /// <para>平方米—单位将为平方米。</para>
            /// </summary>
            [Description("Square meters")]
            [GPEnumValue("SQUARE_METERS")]
            _SQUARE_METERS,

            /// <summary>
            /// <para>Square kilometers</para>
            /// <para>Square kilometers—The units will be square kilometers.</para>
            /// <para>平方公里—单位将为平方千米。</para>
            /// </summary>
            [Description("Square kilometers")]
            [GPEnumValue("SQUARE_KILOMETERS")]
            _SQUARE_KILOMETERS,

        }

        public TabulateIntersection SetEnv(object XYDomain = null, object XYResolution = null, object XYTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null)
        {
            base.SetEnv(XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace);
            return this;
        }

    }

}